package top.lyjwn.todo.weinxin.mch.task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Component;
import top.lyjwn.todo.common.model.LogE;
import top.lyjwn.todo.common.component.InfLogHandle;

@Component
@EnableAsync
public class AsyncTask {
    private static final Logger log = LoggerFactory.getLogger(AsyncTask.class);

    @Autowired(required = false)
    private InfLogHandle infLogHandle;

    @Async("weixinMchExecutor")
    public void notarizePayorRefundWriteLog(LogE logE)
    {
        if (infLogHandle!=null)
        {
            infLogHandle.write(logE);
        }
    }
}
